From: Sebastian Keller Date: Fri, 11 Sep 2026 11:05:50 +0000 (+0200) Subject: main: Initialize brightnessManager before panel X-Git-Tag: archive/raspbian/50.5-1+rpi1^2~6^2^2~11 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8f3230eff304125b8955179071855ba01bb22351;p=gnome-shell.git main: Initialize brightnessManager before panel The brightness indicator initialized via `QuckSettings::_setupIndicators()` as part of the panel initialization depends on `Main.brightnessManager`, which was only getting initialized after the panel in `_initializeUI()`. In practice this usually was not a problem, because the wait for NetworkManager and Bluetooth in `_setupIndicators()` was enough of a delay for `Main.brightnessManager` to have been initialized by the time the brightness indicator is initialized. But on systems where gnome-shell was built without these, this could have resulted in quick settings not initializing properly. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/9378 Part-of: (cherry picked from commit 1e6e40e2a7e48ff1d319ba110de756a14c1dd550) --- diff --git a/js/ui/main.js b/js/ui/main.js index 01a18b5a2..3f8bbf576 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -244,6 +244,9 @@ async function _initializeUI() { screenshotUI = new Screenshot.ScreenshotUI(); + brightnessManager = new BrightnessManager.BrightnessManager(); + brightnessDBus = new ShellDBus.BrightnessDBus(brightnessManager); + messageTray = new MessageTray.MessageTray(); panel = new Panel.Panel(); keyboard = new Keyboard.KeyboardManager(); @@ -260,9 +263,6 @@ async function _initializeUI() { breakManagerDispatcher = new BreakManager.BreakDispatcher(breakManager); timeLimitsDispatcher = new TimeLimitsManager.TimeLimitsDispatcher(timeLimitsManager); - brightnessManager = new BrightnessManager.BrightnessManager(); - brightnessDBus = new ShellDBus.BrightnessDBus(brightnessManager); - global.connect('shutdown', () => { // Block shutdown until the session history file has been written const loop = new GLib.MainLoop(null, false);